<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
<script>
    $.ajax({
        url: "http://localhost:8080/hello",
        method: 'post',
        dataType: 'json',
        data: {},
        success: function (data) {
            console.log(data);
        },
        error: function (data) {
            alert('服务器错误');
        }
    });
</script>
</body>
</html>